package com.example.dowertefense;

import java.util.Vector;

public class ObjectManager {
	private static Vector<GameObject> listOfObjects;
	
	public ObjectManager()
	{
		listOfObjects = new Vector<GameObject>();
	}
	
	public void AddObject(GameObject toAdd)
	{
		listOfObjects.add(toAdd);
	}
	
	public static void RemoveObject(GameObject toRemove)
	{
		listOfObjects.remove(toRemove);
	}
	
	public void Update()
	{
		for(int i = 0; i < listOfObjects.size(); i = i+1)
		{
			listOfObjects.get(i).Update();
		}
	}
	
	public void Draw()
	{
		//for(int i = 0; i < listOfObjects.size(); i = i+1)
		//{
		//	listOfObjects.get(i).onDraw();
		//}
	}
}
